import React from "react";
import Zcon from "@cbd/icon";
import { Button } from "antd";

const CardTitle = (props) => {
  const { total = 0, handleCreateVisible, addVisible } = props;
  return (
    <div>
      <span className="list__title">{`审批意见列表（${total}）`}</span>
      {addVisible && (
        <Button
          type="primary"
          size="small"
          onClick={() => handleCreateVisible(true)}
        >
          <Zcon type="plus" style={{ fontSize: "14px" }} />
          <span>&nbsp;&nbsp;新建</span>
        </Button>
      )}
    </div>
  );
};
export default CardTitle;
